﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.Domain.Entities;
using Volo.Abp.MultiTenancy;

namespace ERP.Workflow.Designer.Domain
{
    public class LinkLabel : AggregateRoot<Guid>, IMultiTenant,ISoftDelete
    {
   
        public void SetId(Guid id)
        {
            Id = Id;
        }
        public Guid? TenantId { get; set; }

        public Guid? ParentId { get; set; }
        public Link? Parent { get; set; } 
        public string? Content { get; set; }
        public double? Distance { get; set; }
        public double OffsetX { get; set; } 
        public double OffsetY { get; set; }
        public Guid DefinitionId { get; set; }
        public Definition Definition { get; set; }
        public bool IsDeleted { get; set; }

        public void SoftDelete() => IsDeleted = true;

        public void SetOffset(double x, double y)
        {
            OffsetX = x;
            OffsetY = y;
        }
        public void Set(Guid? parentId, string? context, double? distance)
        {
            ParentId = parentId;
            Content = context;
            Distance = distance;
        }
        public void SetTenantId(Guid? tenantId)=>TenantId=tenantId;
    }
}


